package com.wang.wangrpc.fault.tolerant;

import com.wang.wangrpc.spi.SpiLoader;

/**
 * @Author 王子旭
 * @Date 2025/04/06 15:25
 * @Version 1.0
 */
public class TolerantStrategyFactory {
    static {
        SpiLoader.load(TolerantStrategy.class);
    }

    /**
     * 默认容错策略
     */
    private static final TolerantStrategy DEFAULT_RETRY_STRATEGY = new FailFastTolerantStrategy();

    public static TolerantStrategy getInstance(String key) {
        return SpiLoader.getInstance(TolerantStrategy.class,key);
    }
}
